view
Tweet
hifi: #21622 Create turret which fires projectiles

For a game. Needed:

A turret system which shoots at player with bullets & effects. System sound behave like:

If enabled = true, will try to shoot at the player if player is within activeDistance units. It rotates to point at the player at the speed rotateSpeed. It begins firing shots at an interval, shootingInterval. If alwaysShoot is false, it waits until it has a clean shot of the player. It plays a one shot audio clip called chargeSound. As soon as chargeSound finishes, plays shotSound clip, rezzes shotParticle effect and rezzes/shoots bullet with bulletVelocity and bulletGravity parameters. Bullet plays flightSound as it whizzes thru the air. If smartBullet is true, it will attempt to follow the player. Bullet has particleEffect called flightParticle which trails behind it. If bullet hits something, it plays hitSound and rezzes hitParticle. When the bullet collides with something, it serializes a JSON object with this information and sends it to the Message system:

bulletUUID - ID of the bullet
turretUUID - ID of turrent
colliderUUID - ID of whatever was struck
bulletDamage - how powerful was it


Entity must have the following settings:

rotateSpeed - How fast does it lerp to point at the player. Example:
(0, 1, 0) Always pointing at player on Y axis
(0.5, 0.5, 0.5) Lerps to player on all axes
(0.5, 0, 0) rotates on X axis only
shootingInterval - float. how frequently does it shoot at the player
enabled - Bool. Whether or not it's actually operating
alwaysShoot - Bool. Is it always shooting or only when has a clean shot
activeDistance - float. Distance will it become active
bulletVelocity - float. How fast will the bullet travel
bulletGravity - vec3 for gravity
bulletDamage - float. How much damage can it inflict
smartBullet - bool. if on, the bullet attempts to follow player
chargingSound - One shot audio clip played while charging to shoot
shotSound - One shot audio clip played when shot is fired
hitSound - One shot audio clip played when shot hits something
flightSound - Looping audio clip played when bullet travels thru air
shotParticle - Particle system entity rezzed when bullet is shot
flightParticle - Particle system entity rezzed with bullet
hitParticle - Particle system entity rezzed when bullet hits something
hitMessage - he name of a function to call on the entity it hits.

Entities/Assets:

turret.fbx - the model of the turret itself.
turretBase.fbx - a model which sits beneath the turret
bullet.fbx - model of projectile
chargeSound.wav - Energy charging up sound
shotSound.wav - Like a gun shooting a bullet
hitSound.wav - Explosion type sound when it hits
flightSound.wav - looping whiz thru air sound
shotParticle.json - Smoke and sparks one shot effect
flightParticle.json - for creating a trail of smoke
hitParticle.json - explosion when it hits something

Comments & Activity

  • 16 days, 22 hrs ago

    #21622 created by pippilina Status set to Bidding.

  • 16 days, 22 hrs ago

    #21622 updated by pippilina Changes: Summary changed. Notes changed.

  • 16 days, 22 hrs ago

    #21622 updated by pippilina Changes: Notes changed.

  • Is there a ref image of a turret that you have in mind ?
  • @pippilina This sounds really cool! Could we break out 2 things into a follow up job? I'm less confident on them and I think I could still deliver something useful without them.

    1) Only let the turret rotate on the X axis -- rotating on all axes would be great but introduces modeling difficulty.
    2) No smartBullet -- turret will not check for a clean shot

    Thoughts?
  • @pippilina would something like this work for a turret? What would you change?

    https://free3d.com/3d-model/machinegun-turret-49234.html
  • 12 days, 14 hrs ago

    A bid was placed on #21622

  • 10 days, 2 hrs ago

    A bid was placed on #21622

  • 10 days, 2 hrs ago

    A bid was deleted from #21622

  • 10 days, 2 hrs ago

    A bid was placed on #21622

  • All we need here is a really basic sci-fi model without anything fancy. What is important is the functionality.
  • 5 days, 19 hrs ago

    A bid was placed on #21622

Labels Saved!

Bids

Login to bid
Who Amount Done in ...
*name hidden*$ ***7 days
Login to add fees