SA-MP Forums

Go Back   SA-MP Forums > SA-MP DL Edition > SA-MP 0.3.DL

Reply
 
Thread Tools Display Modes
Old 10/08/2019, 07:34 PM   #1
Unte99
Gangsta
 
Unte99's Avatar
 
Join Date: Jul 2010
Location: Lithuania
Posts: 606
Reputation: 62
Default Player camera collision with objects

I'm having this player camera collision problem where a players camera from one side of the object collides with it and does not go through it and it does not collide with the object from the other side. Has anyone run into this problem? I thought that it was only like that for that specific model/object, but it was like that for others. The first model/object I tried to work with was 19176. It's the Palomino Creek bank door. In the vanilla GTA SA you can go to that door and when you get close to the door and move your camera around you can go through that door and see the inside of the bank. So I thought that I just needed to use an another base object for what I was trying to do. I was trying to make a window. Then I tried using 19466. Which is already a window and all I need to do is just change the size to what I want. I changed the size. Went in-game into the server. And the problem was still there even with another model. From one side the players camera collides with the object and from the other the camera does not collide with the object.

I could try duplicating the model and face it to another side and see if that works, but maybe there is another more smart, simple and real solution to this problem that someone knows?
Attached Images
File Type: jpg sa-mp-013.jpg (178.6 KB, 30 views)
File Type: jpg sa-mp-014.jpg (176.2 KB, 28 views)
Unte99 is offline   Reply With Quote
Old 11/08/2019, 10:56 PM   #2
Mrhind
Big Clucker
 
Mrhind's Avatar
 
Join Date: Mar 2019
Location: Somewhere in the world.
Posts: 56
Reputation: 39
Default Re: Player camera collision with objects

Possibly is because the collision this done in boxed, or because not having a normal collision.
__________________

Actually retired from the Pawn programming.
If you want to communicate with me, use the links below.


Model Developer - Version 0.3 DL.
Use the links below to access my Portfolio.

_____
Mrhind is offline   Reply With Quote
Old 23/08/2019, 06:17 PM   #3
Unte99
Gangsta
 
Unte99's Avatar
 
Join Date: Jul 2010
Location: Lithuania
Posts: 606
Reputation: 62
Default Re: Player camera collision with objects

Quote:
Originally Posted by Mrhind View Post
Possibly is because the collision this done in boxed, or because not having a normal collision.
Could you try and make that? And if you make it, could you tell me what you did? I don't have much free time and I have been messing with this for days. I don't understand what I am doing wrong. At first, I was using the DragonFF add-on for 2.8 Blender, but then I have a shot with ponzo's add-on for 2.6 Blender. I somehow managed to get the collision for both sides, but the model was invisible. I was just messing around with it. This was when I was using DragonFF. Now I'm trying to do this with ponzo's add-on. I can see the model, but the collision for the player's camera is again only for one side. I am using 19466 as base object. When I spawn the default object in the server and I spawn my custom made, I can see that the brightness differs. The custom made one's color/brightness is darker. But I copied the texture from the default one, so I don't know why there is that difference. Thought the default object and the custom made one have the same collision problem with the player camera. On one side the camera collides with the window and on the other it does not. I looked at the flags of the object and I didn't really see that could be causing that one-sided collision for the player's camera. Thought the collision for the player model works on both sides. Are windows just the way work like that in GTA SA?

I tried duplicating the model, deleting the texture for one object so it would seem like there is only one object when in-game. I failed. I didn't quite understand how I would need to make two models in one place where one would be invisible and be there just for the player's camera collision. When I tried deleting the texture for one model, Blender would give an attribute error.

Any help appreciated.
Unte99 is offline   Reply With Quote
Old 24/08/2019, 06:23 AM   #4
Mrhind
Big Clucker
 
Mrhind's Avatar
 
Join Date: Mar 2019
Location: Somewhere in the world.
Posts: 56
Reputation: 39
Default Re: Player camera collision with objects

Join my Discord server and we talk, very little I check the forum.
__________________

Actually retired from the Pawn programming.
If you want to communicate with me, use the links below.


Model Developer - Version 0.3 DL.
Use the links below to access my Portfolio.

_____
Mrhind is offline   Reply With Quote
Old 24/08/2019, 09:59 AM   #5
Kasis
Huge Clucker
 
Kasis's Avatar
 
Join Date: Mar 2010
Location: Weed, New Mexico
Posts: 413
Reputation: 81
Default Re: Player camera collision with objects

Try kdff tool for generating collisions. https://forum.sa-mp.com/showthread.php?t=644075
__________________
Kasis is offline   Reply With Quote
Old 24/08/2019, 10:21 AM   #6
Unte99
Gangsta
 
Unte99's Avatar
 
Join Date: Jul 2010
Location: Lithuania
Posts: 606
Reputation: 62
Default Re: Player camera collision with objects

Quote:
Originally Posted by Kasis View Post
Try kdff tool for generating collisions. https://forum.sa-mp.com/showthread.php?t=644075
I am using it. I resize the model in Blender 2.6.3 and then export it using ponzo's dff add-on. Then use kdffgui to upload the dff model to the program, select Mesh, leave the Optimize tick, create the collision and then save the dff model. And it has the same one-sided collision for the players camera as the default object 19466 in SAMP.img. And using the AddSimpleModel line I use 19466 as the base id. Maybe I just need another base model?
Unte99 is offline   Reply With Quote
Old 24/08/2019, 10:40 PM   #7
Kasis
Huge Clucker
 
Kasis's Avatar
 
Join Date: Mar 2010
Location: Weed, New Mexico
Posts: 413
Reputation: 81
Default Re: Player camera collision with objects

Quote:
Originally Posted by Unte99 View Post
I am using it. I resize the model in Blender 2.6.3 and then export it using ponzo's dff add-on. Then use kdffgui to upload the dff model to the program, select Mesh, leave the Optimize tick, create the collision and then save the dff model. And it has the same one-sided collision for the players camera as the default object 19466 in SAMP.img. And using the AddSimpleModel line I use 19466 as the base id. Maybe I just need another base model?
Hard to say anything because of Blender. You could try shell the object or copy paste and flip it, so the front face is covering main objects back as front. Attach it make it as one, export and generate colls.

Anyways, could be 0.3dl bug just like when you change opacity of object and stuff dont show up when you look thru. Never checked camera collisions on such opacity objects tho.
__________________
Kasis is offline   Reply With Quote
Old 25/08/2019, 02:06 AM   #8
Mrhind
Big Clucker
 
Mrhind's Avatar
 
Join Date: Mar 2019
Location: Somewhere in the world.
Posts: 56
Reputation: 39
Default Re: Player camera collision with objects

Can u attach the file? That way I see what you are doing wrong, or I can send u the repaired file.
__________________

Actually retired from the Pawn programming.
If you want to communicate with me, use the links below.


Model Developer - Version 0.3 DL.
Use the links below to access my Portfolio.

_____
Mrhind is offline   Reply With Quote
Old 25/08/2019, 12:57 PM   #9
Unte99
Gangsta
 
Unte99's Avatar
 
Join Date: Jul 2010
Location: Lithuania
Posts: 606
Reputation: 62
Default Re: Player camera collision with objects

Quote:
Originally Posted by Mrhind View Post
Can u attach the file? That way I see what you are doing wrong, or I can send u the repaired file.
This is what I'm working with. I tried duplicating the faces, doing a 180 on the duplicate and removing the texture so the other one would just be there invisible only for the collision. But It would still show up as two objects with the same texture making hard to see through both of the windows.

AddSimpleModel(-1, 19466, -2002, "window1.dff", "window1");
Attached Files
File Type: zip window1.zip (1.1 KB, 1 views)
Unte99 is offline   Reply With Quote
Old 25/08/2019, 04:32 PM   #10
Kasis
Huge Clucker
 
Kasis's Avatar
 
Join Date: Mar 2010
Location: Weed, New Mexico
Posts: 413
Reputation: 81
Default Re: Player camera collision with objects

Quote:
Originally Posted by Unte99 View Post
This is what I'm working with. I tried duplicating the faces, doing a 180 on the duplicate and removing the texture so the other one would just be there invisible only for the collision. But It would still show up as two objects with the same texture making hard to see through both of the windows.

AddSimpleModel(-1, 19466, -2002, "window1.dff", "window1");
Got your window collisions working, but its slightly off color

Anyways, its because the object is single face and collisions are generated on front face. Also do use 19466 as base, otherwise you will get transparency glitch.
Attached Images
File Type: jpg sa-mp-006.jpg (185.0 KB, 10 views)
Attached Files
File Type: rar window11.rar (726 Bytes, 1 views)
__________________
Kasis is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(CUSTOM) Created objects not recognized by player's camera view Riddick94 Scripting Help 2 20/12/2015 08:59 PM
[BUG] camera collision NeverKnow Scripting Help 14 28/04/2015 09:47 PM
Some RC4 objects don't have camera collision. Crayder Scripting Help 2 18/04/2015 01:36 AM
Player Camera Goes Trough Objects And Attached Objects. [WSF]ThA_Devil Scripting Help 1 20/11/2013 02:40 PM


All times are GMT. The time now is 06:00 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.