playMaker

Author Topic: Weapon Spread, how to?  (Read 157 times)

Franck

  • Playmaker Newbie
  • *
  • Posts: 23
    • View Profile
Weapon Spread, how to?
« on: September 14, 2018, 12:26:16 PM »
Hi folks,

I'm ready to finish my FPS character. All I have to do is find a way to make the weapons less accurate.
I use the raycasts for aiming and I would like that when my character shot it is less and less accurate.
Do you have any idea how I can do it?
I thought about moving the main camera while shooting but there is no result.

krmko

  • Beta Group
  • Hero Member
  • *
  • Posts: 777
    • View Profile
    • Fat Pug Studio
Re: Weapon Spread, how to?
« Reply #1 on: September 16, 2018, 06:22:11 AM »
Shake the object of raycast origin?

heavygunner

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: Weapon Spread, how to?
« Reply #2 on: September 16, 2018, 04:33:56 PM »
Hi Frank !

Sorry for offtopic.

I also learning Playmaker. Do you follow any course or tutorial series about this FPS ?

Thanks

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 114
    • View Profile
    • multiplayer adult fighting
Re: Weapon Spread, how to?
« Reply #3 on: September 17, 2018, 12:42:10 AM »
If I would solve something like this I'd prefer to make it this way:
1) found the point of bullet hit with a raycast;
2) get the random point around the original point inside some small radius;
3) increase or decrease this random search radius depends on your tasks.

This way you will have accuracy independent from raycasting object, camera, e.t.c. And you will be able to precise manipulate accuracy with search radius (float variable )
indie developer of multiplayer adult fighting
http://nakedfighter3d.com

Franck

  • Playmaker Newbie
  • *
  • Posts: 23
    • View Profile
Re: Weapon Spread, how to?
« Reply #4 on: September 18, 2018, 04:15:03 AM »
Hi heavygunner,

I started taking a UDEMY course on C# and unity, to get the basics. Since the class was not enough to do everything I wanted I went to Playmaker. I watched some basic tutorials to start and then I try to get by on my own. If I stumble on something I search first on the internet and then if I can not find I come here on this great forum of mutual aid.

Franck

  • Playmaker Newbie
  • *
  • Posts: 23
    • View Profile
Re: Weapon Spread, how to?
« Reply #5 on: September 18, 2018, 04:16:35 AM »
nFighter,

I'm not sure I understand everything. Can you be more specific please?

Franck

  • Playmaker Newbie
  • *
  • Posts: 23
    • View Profile
Re: Weapon Spread, how to?
« Reply #6 on: September 18, 2018, 04:17:15 AM »
krmko,

can you explain please how to?

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 114
    • View Profile
    • multiplayer adult fighting
Re: Weapon Spread, how to?
« Reply #7 on: September 18, 2018, 04:34:08 AM »
Sure. What part exactly are not clear for you?
indie developer of multiplayer adult fighting
http://nakedfighter3d.com

Franck

  • Playmaker Newbie
  • *
  • Posts: 23
    • View Profile
Re: Weapon Spread, how to?
« Reply #8 on: September 20, 2018, 05:22:51 AM »
In fact I think I understood where you want to go with your solution.
The problem I see is that the shot will lose accuracy but the player will not know why.
What I would like to do is that during a shot the crosshair moves and up a little the weapon to simulate what would happen in real life. Basically, as in PUBG for example.