Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

DevBlog 4 - Laser Frame Stretching

DevBlog 4 - Laser Frame Stretching

enigma_dev
enigma_dev
Space Battle Arcade Dev · · 1 min read
10,968 0

With editor ui and a level system integrated, I can visualize my idea for stretching projectiles.


It roughly works like this:

The projectile end points are determined based on delta time, and the distance between them.

The model is offset and scaled so that we can use one tip of the projectile as something like a pivot point

The model is first scaled in local space (eg along z axis) by the distance between the two points.

Then the model is rotated so that it is moving in the correct direction of the projectile.

After rotation, the model is translated to the correct location.

Now the projectile is essentially occupying the space between the last frame's position and the current frame's position.

Discussion

Loading comments...