playMaker

Author Topic: Multiple physics pushes chained together  (Read 1213 times)

Krileon

  • Full Member
  • ***
  • Posts: 107
    • View Profile
Multiple physics pushes chained together
« on: January 23, 2013, 05:31:06 PM »
I'm working on implementing spring pads that when a rigid body character lands on it it will launch them into the air. This seams to work by applying a large force to them on the Y axis. However, I want to chain multiple push pads together. So for example there is a push pad on the ground that shoots them into the air and there is a push pad on the wall to the left in the air, which then shoves them with that same force to the right. This is where I am having problems. Pushing them to the right with no position supplied when they hit it seams to apply the force at some sort of downwards angle, but I want it to push them straight right. Basically, how do I get the left position of a game object so I can apply the force to the left causing it to push to the right?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: Multiple physics pushes chained together
« Reply #1 on: January 24, 2013, 06:34:21 AM »
Hi,

you need to get the local axis of the gameObject. that will give you the directions of the object relative to itself.

in the scene, select your object, and study the tripos ( red green blue arrows), and make sure you have selected "local" in the top bar of Unity interface ( Pivot | Local ) as opposed to ( CENTER | GLOBAL )

so the apply force from the left, means applying force in the positive x axis. AND you must check "Self" for the Space if you use an action such as "Add Force",

bye,

 Jean

Krileon

  • Full Member
  • ***
  • Posts: 107
    • View Profile
Re: Multiple physics pushes chained together
« Reply #2 on: January 24, 2013, 06:43:30 PM »
Ah, I see. It's an issue with Advanced 2.5D Platformer Kit. My implementation works flawless with a standard cube. Thanks, will take a look into what's happening.