playMaker

Author Topic: newbie question: get object movement info  (Read 86 times)

mue114

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
newbie question: get object movement info
« on: February 16, 2021, 12:36:44 PM »
Dear Playmaker Gurus!
I'm very beginner in Playmaker.

I'm trying to achive an object aiming/throwing mechanism (with rotation), but I cant find the way.

Here is what I want to achive:
As you see in the video I can move the mouse in the circle (around the center).  It is the aiming phase.

I want to shoot a rectangle (darker line) with the following method: I press mouse button, move the mouse (inside the circle) and while moving I release the mouse button.
These actions gives the rectangle a power, direction and rotation.
I want to transfer all these data into another object.

I was trying with "get vectors", "get velocity", etc, but I failed to achieve to transfer all these info into another object (or the darker line itself - both would be okay) to shoot it with the specific power/direction/rotation.

Any idea how to "get" all these data? How to get and store a complete phyisical force in variables?
I hope I was clear :).
Thanks,
Mate
« Last Edit: February 16, 2021, 02:19:49 PM by mue114 »

RobotGoggles

  • Playmaker Newbie
  • *
  • Posts: 20
    • View Profile
Re: newbie question: get object movement info
« Reply #1 on: February 17, 2021, 01:56:49 AM »
You can probably get the force you're looking for by getting the positions of the red sphere and the center of the throwing mechanism, then use a Get Vector3 Magnitude using those 2 values. Assuming the angle between those two controls the angle of the projectile, you should be able to just apply the force variable to one of the values in a vector 3 and use it as the velocity of the projectile.
When life hands you insomnia, make video games.