Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: coffeeANDsoda on June 23, 2014, 09:08:38 PM
-
I have a object that the player controls where it doesn't rely on a two wheel driving system. And in my game I want to set a object to trigger slowing down the players car.
How can I slow down the cars speed.
-
How about Add Force in the opposite direction?
-
How about Add Force in the opposite direction?
How would that work though? Because when I added that in a state, even with the other being connected with a trigger event, it falls off of the level.
-
How about a button that increases the drag on the rigid body and resets it when you let go?
-
How about a button that increases the drag on the rigid body and resets it when you let go?
What would that mean in terms of setting up the correct action for that state? Cause I'm trying to simulate mud.
-
You should be able to make a Physics Material to simulate mud, apply that to the surface and let the physics simulation handle the slowdown:
http://docs.unity3d.com/Manual/class-PhysicMaterial.html
No actions needed, just physics tweaking...
Unless you have to cheat and manipulate the drag (or other physics properties) as sebaslive suggests. There is a Set Drag action you could use, and a Set Property action to set other Rigidbody properties (there are videos on our YouTube channel showing how to use Get/Set Property).
-
When I add a rigidbody to the player with the standard movement scripts I get a error message.
Actor::updateMassFromShapes: Compute mesh inertia tensor failed for one of the actor's mesh shapes!Please Change mesh geometry or supply a tensor manually!
And for the player, I tried both quad and cube.
-
Are you using a Mesh Collider?
A quick search about this error:
http://answers.unity3d.com/questions/386168/updatemassfromshapes-error.html
-
Are you using a Mesh Collider?
Yes I am. I did remove it and got the same message. Do you think if has to do with actions simple move and controller settings?
-
Did you replace it with a primitive collider? I don't think it has anything to do with the actions since it happens with regular scripts too... I think it's more of a physics setup issue (with an unhelpful error message!).
-
Did you replace it with a primitive collider?
No. What would that be? A box collider?
-
Whichever primitive collider best matches the shape of the player (box, sphere, capsule)
-
Whichever primitive collider best matches the shape of the player (box, sphere, capsule)
Since it is the length of a car I used one and the this happens after the game pauses.
Actor::updateMassFromShapes: Compute mesh inertia tensor failed for one of the actor's mesh shapes! Please change mesh geometry or supply a tensor manually!
UnityEngine.CharacterController:SimpleMove(Vector3)
HutongGames.PlayMaker.Actions.ControllerSimpleMove:OnUpdate() (at Assets/PlayMaker/Actions/ControllerSimpleMove.cs:52)
HutongGames.PlayMaker.FsmState:OnUpdate()
HutongGames.PlayMaker.Fsm:UpdateState(FsmState)
HutongGames.PlayMaker.Fsm:Update()
PlayMakerFSM:Update()
and Actor::updateMassFromShapes: Compute mesh inertia tensor failed for one of the actor's mesh shapes! Please change mesh geometry or supply a tensor manually!
UnityEngine.CharacterController:Move(Vector3)
CharacterMotor:UpdateFunction() (at Assets/Standard Assets/Character Controllers/Sources/Scripts/CharacterMotor.js:229)
CharacterMotor:FixedUpdate() (at Assets/Standard Assets/Character Controllers/Sources/Scripts/CharacterMotor.js:331)
What should I do when dealing with rigidbody settings? Cause you have collision detection settings, interpolate and everything else.
-
Do you have a mesh collider on one of the children?
-
Do you have a mesh collider on one of the children?
I have it set up so the drivers is inside of or part of the vehicle. I forgot to remove the mesh collider on the driver. So when I removed it and applied a box collider and rigidbody to the car the whole thing goes up in the air, settles, and then the camera freaks out.
Would I have to freeze the position in order to not make it do that?
-
Do you have any overlapping rigidbodies? If rigidbodies start in collision you can get some weird behaviour on startup while they push themselves apart...
-
Overlapping rigidbodies as in each of them have the same dragging attributes?