Fallingblock splashes

Discussion in 'Plugin Development' started by rcth, Mar 20, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    rcth

    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.
     
  2. Offline

    rcth

    Anyone?
     
  3. Offline

    ark9026

    @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.
     
  4. Offline

    rcth

    '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());
     
  5. Offline

    ark9026

    @rcth
    Oops, my mistake there, sorry
     
Thread Status:
Not open for further replies.

Share This Page