playMaker

Author Topic: I need some help, My bullet speed is too fast to detect collision.  (Read 1305 times)

wangcai

  • Playmaker Newbie
  • *
  • Posts: 7
I need some help, I'm making a shooter game. When the bullet is flying very fast. rigid body often fail to detect collisions. How can I set them up so that bullets can still be detected when they are very fast.what do i need to do.I used Add Force to apply a force to the bullet,Or Translate was used to give the bullet a direction.I don't want to use raycast. I want the bullet to fly.Bullet has a trajectory.Excuse me, how can I make the bullet be detected when the speed is very fast.
Thank you all for your help, I used Google Translate. I don't know if you can understand it.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: I need some help, My bullet speed is too fast to detect collision.
« Reply #1 on: August 11, 2023, 09:30:13 AM »
Hi
on rigid bodies you need to set the collision detection to 'Continious'
if the bullet is still passing through, try to increase the collider size.

You might need to use a raycast to do the hit detection.

with a raycast do the raycast first, then use the hit point to move to bullet to (for example with a tween position.
the bullet then does not need any collider (as the raycast is handling hit)

here is a raycast tutorial :


wangcai

  • Playmaker Newbie
  • *
  • Posts: 7
Re: I need some help, My bullet speed is too fast to detect collision.
« Reply #2 on: August 15, 2023, 11:18:38 PM »
Thank you very much for your help.