Jump to content

Powerhorst

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Powerhorst

  1. Hey there!

     

    Not entirely sure if this is just on my side, so feel free to delete this if I'm wrong.

     

    I'm using Math:Random for my everyday needs in random numbers but it seems like I'm getting

    the same numbers every time.

     

    z = Math:Random(-10,10)

     

    So even after restarting my project a few times, z always gets the same value.

    The info-page states that LUA uses Math:Rnd instead but that just throws an error.

    Sorry for the inconvenience if I'm just using it wrong but I can't find any other way so far.

     

     

    Greets

  2. Hey guys,

     

    So I'm currently trying out Leadwerks during my free-time and must say, I'm really happy with it.

     

    As my first Learning-project I want to create a simple BrickOut-Clone

    (Maybe better known as "that Pong-game where you try to destroy blocks")

     

    Now most of this works out fine for me and I'm starting to understand the engine-concepts but I can't seem to get the ball-behaviour right.

     

    Usually in those games the ball hits a barrier or the player-paddle and reflects its direction without losing any of its velocity.

     

    post-14234-0-76087500-1424535611.png

     

    If it choose to make the ball a rigidbody the reflections will happen without any problems (thanks to the colliders) but it will naturally lose its velocity thanks to the impact.

     

    Do you know any ways to prevent this from happening?

    It seems like I'm only lacking a simple command line to get this done.

    Something like rigidbody.KeepForce or rigidbody.SetElasticity

     

     

     

    Thanks in advance for any help happy.png

     

    Greets

×
×
  • Create New...