PlayMaker Help & Tips > PlayMaker Help

Add force to parented object only on one axis

(1/3) > >>

18LSC:
I have made a pickup script, which parents the held object to a small invisible cube in front the player. Which I can also mouse look rotate with a key.

I want to be able to throw the object, by adding force to it along the players Z axis.

My problem is the 2 options for adding force are "world or self", world wont work because the player is constantly rotating around. So the added force will throw the object in random directions.
And self won't work either because the held objects Z axis also keeps changing.

I want to add force to the held object that always follow the players Z (or other) axis, how do I isolate the always changing players axis and apply that direction of force to the held object each time? regardless of the world or the held objects personal axis? :-\  thank you.

djaydino:
Hi,
Maybe you can use an empty parent on the held object and then add force on that?

Many times i use multiple partents on a singe object. especially on the player

18LSC:

--- Quote from: djaydino on March 13, 2018, 01:05:52 PM ---Hi,
Maybe you can use an empty parent on the held object and then add force on that?

Many times i use multiple partents on a singe object. especially on the player

--- End quote ---

I fail to see how that would be any different, the empty would then also rotate when I pick it up, changing its axis just like before

djaydino:
Hi.
Can you show some images or a video on what you try to do?
Maybe i misunderstood what you mean.

18LSC:

--- Quote from: djaydino on March 14, 2018, 09:53:28 AM ---Hi.
Can you show some images or a video on what you try to do?
Maybe i misunderstood what you mean.

--- End quote ---

Sure, I just want to add force to my held object regardless of its own axis or the world axis, I only want to use the players Z axis

https://i.imgur.com/bMYNSYg.jpg

Navigation

[0] Message Index

[#] Next page

Go to full version