playMaker

Author Topic: Add Relative Force 3d[SOLVED]  (Read 94 times)

westingtyler

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
    • My Video Game Projects Web Site
Add Relative Force 3d[SOLVED]
« on: May 20, 2020, 03:43:17 AM »
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.)
« Last Edit: May 21, 2020, 11:15:26 PM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15237
  • Official Playmaker Support
    • View Profile
Re: Add Relative Force 3d
« Reply #1 on: May 21, 2020, 11:15:14 PM »
Hi,

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

Bye,

 Jean

westingtyler

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
    • My Video Game Projects Web Site
Re: Add Relative Force 3d[SOLVED]
« Reply #2 on: May 22, 2020, 04:13:03 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 15237
  • Official Playmaker Support
    • View Profile
Re: Add Relative Force 3d[SOLVED]
« Reply #3 on: May 22, 2020, 05:16:18 AM »
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