Hello fellow developers, I'm trying to create some sort of "splashes" for our rollercoaster rides. Goal: Train activates a custom sign with some data for the splashes and spawns these. I'm working with the cart velocity to create bigger splashes when the carts go faster. But... The velocity seems to get really big sometimes, causing the fallingblocks to bug and SHOOT away. I'm using TrainCarts for the longer trains and changing the speeds of carts, but somehow it doesn't change velocity. Like, I set the speed of the train to 0.1 but the velocity is still somewhere around 9, where splashes stay nice to somewhere 0.5 velocity. http://pastebin.com/4M4CqWkD This is the code. I tried adding a velocity limiter, but that doesn't even seem to work. It still accepts all velocity and doesn't change a bit. Anyone can help me with that? There is some BKCommonLib code (ParseUtil, MathUtil) in it.
@rcth Code: block.setVelocity(velocity); d += 9.0F; After all the code, you set the velocity to 9.0, try setting this to what you want, and it should work.
'd' is a different variable than 'block'. 'd' acts as a difference on the axis, so the blocks won't spawn at the same coords, but instead rotate a bit. (MathUtil.Rotate());