playMaker

Author Topic: Child Object appears to move after collision.  (Read 1978 times)

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
Child Object appears to move after collision.
« on: September 02, 2017, 12:15:37 PM »
Hi there folks, I'm working on a top down shooter just now and I have an empty game object inside the player as the firepoint.

I cant get my head around why this is happening but at runtime, when my player walks into a wall sideways, it appears to move the firepoint slighltly with no real signs of why, pausing the game and having a look at the firepoint in the scene window shows that it hasn't actually moved. I have also tried to get and set the firepoint location when I instantiate the player (in hopes that would keep it in place).

Here is a GIF with an example of the occurrence.
https://i.gyazo.com/bae45ea5f17ce4dcae7347db15ca6923.gif

I realise this is not playmaker specific but I only use playmaker to make my games
and maybe someone with experience around here has seen this type of thing before....


Thanks,
Dan
« Last Edit: September 02, 2017, 01:08:59 PM by shinodan »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Child Object appears to move after collision.
« Reply #1 on: September 04, 2017, 03:04:51 AM »
Hi,

 is it not rather your player mesh that go twisted? maybe during the collision it got rotated a bit due to friction?

 Bye,

 Jean

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
Re: Child Object appears to move after collision.
« Reply #2 on: September 05, 2017, 04:07:53 AM »
Hmmm, When I change from a capsule collider to a box collider the problem stops happening, but now my player wont walk over any surface with a slight bump and that's pretty annoying too ><

Thanks for the reply Jean!, I got no reply on over on unity answers :(

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Child Object appears to move after collision.
« Reply #3 on: September 06, 2017, 04:57:26 AM »
Hi,

 that's very weird indeed. Can you show more about your setup? like your hierarchy and what components are in there.

 bye,

 Jean

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
Re: Child Object appears to move after collision.
« Reply #4 on: September 06, 2017, 11:56:12 AM »
Hi,

 that's very weird indeed. Can you show more about your setup? like your hierarchy and what components are in there.

 bye,

 Jean

Attached a shot of my unity view for an overall view. Ive tried messing about with rigidbody settings and collider materials too.

 I have also tried removing everything except the player, firepoint and collider. But it made no difference so Ive put everything back into it!

Litteraly the only thing ive found is a box collider. if I use any other it also has weird network consequences like the my player spinning uncontrollably on the opponents client.  :|