playMaker

Author Topic: Lock collider position on Rotating object?  (Read 1148 times)

rechronicle

  • Full Member
  • ***
  • Posts: 119
  • Mystvaldia
    • Indie RPG Creator
Lock collider position on Rotating object?
« on: May 01, 2019, 10:15:03 AM »
Hello,
I want to make the collider keep its position to check if it is grounded.
How to do it exactly?
(Preview in the attachment.)

Thank you!

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: Lock collider position on Rotating object?
« Reply #1 on: May 02, 2019, 03:29:05 AM »
separate the collider on a parent object, then make the child the sphere who can rotate freely on top of it

rechronicle

  • Full Member
  • ***
  • Posts: 119
  • Mystvaldia
    • Indie RPG Creator
Re: Lock collider position on Rotating object?
« Reply #2 on: May 02, 2019, 12:21:59 PM »
Hello,
I actually tried that method, and the collider ended not following the sphere.
I'm not sure then after.

In the end, I'm using the tag to check the 'land' collision and allowing jump if its collide.

Thank you

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: Lock collider position on Rotating object?
« Reply #3 on: May 02, 2019, 03:09:41 PM »
then why not keeping the 2 objects separated and set position of the box collider relative to sphere position ?

this would do the trick