Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

godot projectile

zip wolf answered on March 13, 2023 Popularity 8/10 Helpfulness 2/10

Contents


More Related Answers

  • godot 2d controller
  • reflection in godot
  • position 2d godot 4
  • round godot
  • godot get mouse position
  • how to move something in godot
  • 3d gravity on godot
  • godot mouse to world
  • godot vector2 distance
  • godot 4 mouse wheel
  • gravity in godot
  • movement in godot
  • move between points in godot
  • instancing in godot
  • smoothly rotate to point godot 3d
  • how to rotate in godot
  • godot c# move towards
  • godot change mouse position
  • godot left over of a float devision
  • rotate to angle godot
  • convert angle to 0-360 godot
  • get angle to 3d godot
  • how to make game vertical in godot
  • godot smooth spline
  • how to clear a java console

  • godot projectile

    0

    #bullet

    extends Area3D

    var muzzle_velocity = 25

    var g = Vector3.FORWARD

    var velocity = Vector3.ZERO

    func _physics_process(delta):

         velocity += Vector3.FORWARD

         transform.origin += velocity * delta

    #gun

    var b = get_node("../Bullet").duplicate()

    var node = Node3D.new()

    node.position = position + Vector3(0,0.5,0)

    node.rotation = $Pivot.rotation + rotation

    node.add_child(b)

    get_node("../").add_child(node)

    b.position = Vector3(0,0,0)

    b.velocity = -b.transform.basis.z * b.muzzle_velocity

    Popularity 8/10 Helpfulness 2/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Mar 13 2023
    zip wolf
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.