|
This has been asked before, but the threads Ive read didnt seem to get a satisfactory resolution.. So I post my version.. now with added video! So I made this game to day with my kid on my knee (all his ideas and he designed the cardboard robot) but I ran into a problem... Why does he fall through the magical egg-cup? Robotti is using the standard controller, with Rigid body attached, and the eggcup has a mesh collider (also tried a simple box collider) and also a rigid body... There are some numerous settings for rigid body, but what is correct? Please help? Mark
(comments are locked)
|
|
hallo, I use this, found somewhere here, on a trigger inside the lift and this on a trigger just when exit the lift using OnTrigerExit on the trigger is in the lift don't know why, but don't work Wow!! This very nearly worked Thanks!!! The first script worked like a charm, I just flung it on the eggcup and now Robotti the cardboard robot went sailing up, no problem. BUT... Im afraid when he jumps off at the top, I apply the second script to that patform, but the lift seems to pull him back down and through that geometry. Im assuming that script one is temporarily parenting the player to the platform, so Im not managing to remove the parent it seems. Just to clarify, when you say trigger, do you attatch it to a collider that has Is Trigger turned on, of just a regular collidor. The lift collider works just fine without trigger turned on... But the top platform does not... Mark
Jul 31 '12 at 10:05 PM
markfrancombe
this comment may not be relevant but you need to have a rigid body with kinematic enabled for it to react to physics properly.
Jul 31 '12 at 10:23 PM
reptilebeats
I use a empty gamobject with box collider as trigger, childed to plane of lift tho reuse the second is just forward the door of lift if you don't have something to walk, maybe could surround the cup with some box or if don't need reuse the cup to go down, just put the second trigger at the point you need to junp away, just a bit up the robot, so that is reached when jump
Jul 31 '12 at 10:24 PM
Ingen
Nice idea Ingen...you are right.. the robot must jump out of the cup Ill give it a try... One thing tho, just to check and see if it was working, I added a debug thingy... var platform : Transform; var player : Transform; function OnTriggerEnter () { player.parent = platform; Debug.Log("Im on a lift"); } And noticed that console returned "Im on a lift" as soon as the level loads, NOT when Robotti jumps into the eggcup... is this an error? MArk
Jul 31 '12 at 11:05 PM
markfrancombe
I think yes, can Robotti move normally? It's anyway strange but I never use debug because you can see lift , the cup in your case, is parented to player, directly in the inspector - how much the trigger is big?
Jul 31 '12 at 11:38 PM
Ingen
(comments are locked)
|
