Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Franck on September 14, 2018, 03:26:16 PM

Title: Weapon Spread, how to?
Post by: Franck 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.
Title: Re: Weapon Spread, how to?
Post by: Fat Pug Studio on September 16, 2018, 09:22:11 AM
Shake the object of raycast origin?
Title: Re: Weapon Spread, how to?
Post by: heavygunner 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
Title: Re: Weapon Spread, how to?
Post by: nFighter 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 )
Title: Re: Weapon Spread, how to?
Post by: Franck 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.
Title: Re: Weapon Spread, how to?
Post by: Franck on September 18, 2018, 07:16:35 AM
nFighter,

I'm not sure I understand everything. Can you be more specific please?
Title: Re: Weapon Spread, how to?
Post by: Franck on September 18, 2018, 07:17:15 AM
krmko,

can you explain please how to?
Title: Re: Weapon Spread, how to?
Post by: nFighter on September 18, 2018, 07:34:08 AM
Sure. What part exactly are not clear for you?
Title: Re: Weapon Spread, how to?
Post by: Franck 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.