playMaker

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

Franck

  • Junior Playmaker
  • **
  • Posts: 91
Weapon Spread, how to?
« on: September 14, 2018, 03: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.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Weapon Spread, how to?
« Reply #1 on: September 16, 2018, 09:22:11 AM »
Shake the object of raycast origin?
Available for Playmaker work

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Weapon Spread, how to?
« Reply #2 on: September 16, 2018, 07: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: 174
    • multiplayer adult fighting
Re: Weapon Spread, how to?
« Reply #3 on: September 17, 2018, 03: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

  • Junior Playmaker
  • **
  • Posts: 91
Re: Weapon Spread, how to?
« Reply #4 on: September 18, 2018, 07: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

  • Junior Playmaker
  • **
  • Posts: 91
Re: Weapon Spread, how to?
« Reply #5 on: September 18, 2018, 07:16:35 AM »
nFighter,

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

Franck

  • Junior Playmaker
  • **
  • Posts: 91
Re: Weapon Spread, how to?
« Reply #6 on: September 18, 2018, 07:17:15 AM »
krmko,

can you explain please how to?

nFighter

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

Franck

  • Junior Playmaker
  • **
  • Posts: 91
Re: Weapon Spread, how to?
« Reply #8 on: September 20, 2018, 08: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.