Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Is it possible to make a sphere move towards the direction of the muose as if the ball were flying like an airplane? the opposite direction in order to control its directions with the mouse |
||||
|
Yes, you can do it with or without coding - with coding would be easier. It's a bit difficult for me to explain how I do it...... The way I do it without coding (you'd need the "move AI towards node" plugin) is to use a 1st person camera, then make your sphere shoot towards the camera target, every 70ms. Then (using the same "do every 70ms"), move a billboard to the last bullet position and finally move the sphere's AI towards the billboard. What will happen is, the sphere will continually shoot wherever the mouse is looking. Then a bill board will move to where the last bullet landed, then the Sphere will continually walk towards the billboard. If it's too complicated and no-one else give you some coding, I can upload a ccb for you - but first, please take a look at the "Predator Missile Test" project I just uploaded - as it already has it in the demo for you to see there - if it suits what you want, I can make a new one for you to use - but I'm sure someone has the code already that they can share. |
||||
|
there are plugins by just_in_case for this on his website. [url]https://neophyte.cf/ccb_action_rotate_with_mouse.html[url] hope this will help you. |
||||
|
Thanks for the link... I was going to ask the same question lol edit.. oh the action doesn't do what I hoped |
||||
|
@nigec What exactly do you want to achieve?, The above extension allows you to rotate an object with the mouse. The helix Jump Game Demo on my website uses the same extension to rotate the helix with the mouse. |
||||
|
I think Thomas is asking for a plugin that will move a 3D node to the 2D mouse-position - ie, move the sphere to wherever the mouse cursor is positioned... with additional option for "inverted y-axis" on the mouse movement, so up=down. An aeroplane/flight-stick controller. I uploaded one here just a few days ago - but it's not a plugin, just a ccb file with a world-war 2 aeroplane whic can be flown in any direction by mouse movement. The y-axis was not inverted though. |
||||
|
There is already an extension to move an object with a mouse available actually there are 2 that allows to drag and drop 3D object with the mouse. Also, I don't know if he wanted to have a rotation control with a mouse, but I just updated my rotation control extension. one can use that to create a Flight stick controller as well. as it allows to rotate in any direction. you need to make sure where the object pivot is, For the joystick of the flight stick, the pivot should be at the bottom of the stick. you can then with the help of rotating with mouse action can move it forward backward or sideways. hope that extensions help a bit. |
|