Forces and vectors length
2 posters
Forces and vectors length
OK, now I'm really mad. I doubled speed of my character - just for fun and test, and... Rays checking distance in front and sides hits colliders even if They are loooong way from character. I found, that problem is with camera direction vectors (x,y,z). Rays are cross products of camera direction and world Z axis - if camera moves, direction vector is longer, so rays too and here we go - I'm about 10m from rock and "BUM"... How can I create vector that will have same "transformation, direction" as (in this case) camera but it is own, independent length?
And the second thing, more complex. How can I avoid rigidbody bounces... like ship on the water surface for example. Is there any kind of collision margin? I do not think, that calculating tons of forces etc etc for real water simulation have sense for iPhone. I need object that smoothly slides and rock on non planar surfaces (waves).
I'm fighting with those two things from about three days I'm damn stuck (and tired ) If You can put me onto right direction (with good length ) I will be really greatfull!
Kind regards,
Mad
And the second thing, more complex. How can I avoid rigidbody bounces... like ship on the water surface for example. Is there any kind of collision margin? I do not think, that calculating tons of forces etc etc for real water simulation have sense for iPhone. I need object that smoothly slides and rock on non planar surfaces (waves).
I'm fighting with those two things from about three days I'm damn stuck (and tired ) If You can put me onto right direction (with good length ) I will be really greatfull!
Kind regards,
Mad
_-MADMAN-_- Posts : 52
Join date : 2009-04-23
Re: Forces and vectors length
1) How about a normalized pointer to the camera direction vector? Normalized vectors are always 1 unit long.
2) Maybe you can use the 'terrain clamping' code in this post?
2) Maybe you can use the 'terrain clamping' code in this post?
ColorDelta- Posts : 16
Join date : 2009-03-25
Location : London, UK
Re: Forces and vectors length
1 - hmmm, I have not normalized up vector ;/ I really need to rest.
2- thanks, looks as good idea to reveal - I will try and give You feedback
2- thanks, looks as good idea to reveal - I will try and give You feedback
_-MADMAN-_- Posts : 52
Join date : 2009-04-23
Permissions in this forum:
You cannot reply to topics in this forum
|
|