playMaker

Author Topic: Wheel colliders[SOLVED]  (Read 10295 times)

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 594
    • View Profile
    • Car and Traffic Playmaker assets
Re: Wheel colliders
« Reply #15 on: November 07, 2014, 02:18:17 AM »
Wooaaa Thanks for your input!

But I cant get any info out of them, both actions returns False in bools or zeros in other variables.
Seems actions don't recognize that owner or specific gameobject have wheel collider component?

At first Unity run I got a warning in console that in Ground Hit properties action there are Int var that isn't assigned, but after Unity restart it was gone and cant get it to warn me again, so other than that no errors.


EDIT:

This warning:

Assets/PlayMaker Custom Actions/GetWheelColliderGroundHitProperties.cs(95,30): warning CS0219: The variable `hit' is assigned but its value is never used
« Last Edit: November 07, 2014, 11:11:20 AM by 600 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14387
  • Official Playmaker Support
    • View Profile
Re: Wheel colliders
« Reply #16 on: November 11, 2014, 12:21:52 AM »
Hi,

 don't worry about the warning, I'll fic this, it doesn't affect the behavior.

 I'll run some tests, it was blind coding. Please bump towards the end of the week if you don't hear from me.

 Bye,

 Jean

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 594
    • View Profile
    • Car and Traffic Playmaker assets
Re: Wheel colliders
« Reply #17 on: December 02, 2014, 11:04:35 AM »
bump :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14387
  • Official Playmaker Support
    • View Profile
Re: Wheel colliders
« Reply #18 on: December 04, 2014, 11:45:11 PM »
Hi,

 This is done, I forgot to mention it here.


 Bye

 Jean

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 594
    • View Profile
    • Car and Traffic Playmaker assets
Re: Wheel colliders
« Reply #19 on: December 05, 2014, 04:01:07 AM »
Hi!

Thanks for the link! The warning is gone.

Sorry to bug you again, but I cant get any value out, actions wont react on wheel collider movement and touching the ground.

Am I missing something?

Tried new scene/project/Unity reinstal.

Thanks!

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 594
    • View Profile
    • Car and Traffic Playmaker assets
Re: Wheel colliders
« Reply #20 on: July 08, 2015, 08:37:36 AM »
Hi, action "GetWheelColliderGroundHitProperties" was not giving any values out, copied "return" below "if's" and now it works, without stoping the Play mode now gives 2 errors, please check images below.
What does it mean?
Thanks!

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: Wheel colliders
« Reply #21 on: July 13, 2015, 01:50:04 AM »
Hi nila,

the original code was written to stop if there is no game object referenced (to prevent a reference missing error).

Now you changed the code so it will execute (give you values) even when the gameobject/component is empty (missing). 

Do you get the error message when reaching this action in runtime or after saving the script?

It looks like you have a basic problem with the gameobject/component reference as you didnt get values with the original code.

I have just very basic programming knowledge. so take this advice with a grain of salt.
« Last Edit: July 13, 2015, 01:54:52 AM by doppelmonster »

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 594
    • View Profile
    • Car and Traffic Playmaker assets
Re: Wheel colliders
« Reply #22 on: July 13, 2015, 05:25:52 AM »
Hi, thanks for looking in to this,

after saving the script there are no errors, they show up in runtime.
I made this edit with no programming experience, just experimenting replacing lines looking at other actions :)

The original action returns zero and none in all times,
with this edit I can get the right values (action reacts), but with errors.

If I leave the “return” as default, seems it gives zero values because it skips “if” states below, that made me put the “return” after them.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14387
  • Official Playmaker Support
    • View Profile
Re: Wheel colliders
« Reply #23 on: July 17, 2015, 02:02:18 AM »
Hi,

 ok, I have updated and fixed that action, now it will throw a warning instead of error ( I reported to Unity, it's a bug, the first time the collider value is null... which is wrong because it's a hit indeed...)

 I also made that action available on the Ecosystem, so you can get it directly there now.


Bye,

 Jean

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 594
    • View Profile
    • Car and Traffic Playmaker assets
Re: Wheel colliders
« Reply #24 on: July 17, 2015, 02:15:49 AM »
Yes! Super! Thank you!