Nearl implemented: bullet rotation isn't working correctly.
This commit is contained in:
parent
a9af69e7bb
commit
f427bb0c8d
11 changed files with 161 additions and 9 deletions
|
|
@ -38,12 +38,14 @@ func shoot():
|
|||
# Final position combines symmetrical horizontal spread with fixed vertical offset from weapon origin
|
||||
bullet.position = player.position + Vector2(bullet_horizontal_offset, weapon_data.origin)
|
||||
|
||||
|
||||
|
||||
# Set timing properties on the bullet
|
||||
bullet.time_offset = time_offset
|
||||
bullet.fire_time = current_time + time_offset
|
||||
|
||||
# Set bullet rotation properties
|
||||
bullet.rotate_to_velocity = weapon_data.rotate_to_velocity # This should be true if you want rotation
|
||||
|
||||
|
||||
# Set the angle for bullets - symmetrical spread around vertical (straight up = -90°)
|
||||
if weapon_data.angle == 0:
|
||||
# If angle is 0, all projectiles fire straight up
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue