PlayMaker Feedback > Action Requests

Add Relative Force 3d[SOLVED]

(1/1)

westingtyler:
Hello. the 2d version of this exists, but I cannot locate Add Relative Force 3D on ecosystem or playmaker action list.

I need it to make a 3d ball rolling system like in super monkey ball.

(I'm actually trying to make a bike like in GTA: San Andreas and figured an invisible sphere could work if I could figure out how to roll it and turn it.)

jeanfabre:
Hi,

 it's in AddForce action, choose "self" for the Space property.

Bye,

 Jean

westingtyler:
thanks. I tried that option, but I need it to be 'relative' to the camera direction (pushing W or forward should always roll it forward), and this does not seem to do that. The problem is that with the self option, the ball rolls around, changing where it's "self" forward is pointing randomly.

I just need it to always be relative to the camera.

jeanfabre:
Hi,

 you are misunderstanding the function, self means using the referencial of the object you target, so in your case that's not what you want indeed.

1: take the forward camera axis ( z axis) direction, express is in world space ( using TransformDirection action),
2: set the z axis to 0 on that world space vector
3: normalize it
3: use that as the force direction in world space.

Bye,

 Jean

Navigation

[0] Message Index

Go to full version