Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi, Suppose you want to use a mouse robot 3D mesh like this. You want the mesh to rotate around its 2 wheels (like it is in the reality when only one wheels is turning), and go ahead when the two wheels rotate at same speed. So CC must rotate the same mesh around too center, on command. I'm actually working on that problem using a rather complicated méthod. Does someone see a simple way to do that ? |
||||
|
Other than manually calculating the rotation (+ new position) I don't see a very simple method, sorry. |
||||
|
You want the wheels to turn?? |
||||
|
Niko:I made the mouse son of a dummy cube centered on one of the 2 wheels or the mouse mass center. I move programmaticaly the mouse on one of these point and use the dummy father to rotate or translate the mouse. |
||||
|
Please explain more clearly what you want to do with that mouse mesh... Do u want it to rotate left on the axis when its left wheel is in work... And rotate right when its right wheel is in work... And wanted that if both wheel are working than the mouse will move forward... If this is what you want then you can do it easily..... But first let me know... What you actually wants to do with mesh... |
||||
|
Yes Just-in-case, you understood my problem |
||||
|
There are many ways to do this.... Suppose you have on key pressed do something behaviours in the scene like... When key pressed = left_mouse click... Then play animation of turning of left wheel.. Also add action change rotation of a scenenode... And then change the value of x-axis to negative...and leave y-axis and z-axis to zero... For example set rotation of x-axis to -10... Do something like this with right mouse click... When a key pressed = right_mouse click.... Then play animation of turning of right wheel... Also add an action change rotation of a scenenode....and then change the value of x-axis to positive .... And leave y-axis and z-axis to zeeo... For example aet rotation of x-axis to +10... Now again when a key pressed middle mouse button... Play animation to rotate both wheels... Now instead of changing rotation ...change the position of scenenode... Change position of scenenode.... Move a vector into the facing direction..... Now your problem will be solved... I hope so..... Will try to do something like this tommarow.. and will send you the ccb file.. |
||||
|
Thanck you just_in_case . I solved the problem computing rotation/translation around a center positionned on wheel center . |
|