Coin object Event Tick: On collision I rotate coin faster and lift it up to my character, but how to shrink/scale it down also?

Hi, sorry for the late response, I wanted to play around with the whole angular velocity and scale thing as it didn’t seem right that scale should mess things up, but I didn’t have time yesterday.

I have whipped up a little test now, a very simple one, just testing angular velocity and scaling. Coin (with physics) spins, and is constantly scaled up and down over time.

The physics (as expected) caused several problems. I fixed what I could with settings and fudged the rest. Coin falling over: scaled the simple collision ‘width’. Tiny angular variations after the bounce messing the rotation and ‘ballooning’ out over time: reset rotation after hit. Bounce messing up Angular Vel: reset it after hit. Coin ‘falling’ further as scaled down, then clipping into ground as scaled up: move pivot point to bottom.

End result via gifcap.dev :wink:
Recording 2024-08-07 at 06.04.03

So definitely both working together, but “some fudging required”.

Having done said test now, and despite getting it to work, I can only double down on the no physics suggestion.

Fake it.

My ultimate goal is not only to have them shrink into your body, but also chase you (e.g. if you run past the coin which triggers the pickup, the coin should ALSO kind of chase you a bit faster to meet up with your running body).

I would VInterp this, record coins starting pos on pickup start, then (using the 0.0 → 1.0 ‘pickup progress’) each frame VInterp from the starting point to the characters current position (plus on offset, or use a particular bone/socket/whatever). If this is too linear, put the progress through a curve first to fake the speeding up (or just cube it maybe).

The bounce you get from physics is nice, but you should be able to fake that easily enough. Another option (which I don’t like for some reason) might be to use physics on the drop, and when it comes to rest disable.

1 Like