Hey Guys,
I’m making a 2D Platform game and I’m planning on adding bouncy platforms to it. Do you have any ideas for a script I could use to make that?
THANKS!
Hey Guys,
I’m making a 2D Platform game and I’m planning on adding bouncy platforms to it. Do you have any ideas for a script I could use to make that?
THANKS!
there’s a video on youtube that cover that particular funtion
Ik
Thats my 2d game but the code does not work for me
ok bouncy thingy is a square or whatever. In c#, ya do something like this:
Make sure to check the istrigger box
void 2DOnTriggerEnter(2DCollider coll){
coll.gameObject.transform.position = coll.gameObject.transform.position + new Vector2(0,5) * time.deltaTime;
}
just to say, I’ve never worked with 2d, so I don’t know if thats the functions name of if thats the colliders name.
Maybe you could find out.
could u add the full script like including the using unity engine and the other one
Um…?
Remember, I said I’m not sure of the 2d Collider names, so look that up first.
d
That won’t work properly, because it changes the position where you really want to be changing the velocity.