Jump to content

Assistance with Dark Ped Issue.


Bran.

Recommended Posts

I am currently working on a server project and have encountered an issue related to ped lighting and collision. I could use some serious help.

In a nutshell, after creating a function that successfully creates a ped in nearby radius and I wanted the ped to be none collidable with objects like tables and all sorts so it can look better with animations. So inside the function I added the following :
 

setElementCollisionsEnabled(ped, false)

Which did disable the collisions for the ped. However after the added update the peds spawned really dark which could mean that it also disabled collision with lighting? (idk im fairly new to this).
Anyway I could use some help into figuring out how to disable the collisions and still have the peds look normal with fair lighting.

Thank you in advance.

Link to comment

It seems like you have encountered an issue with the ped lighting after disabling collisions for the peds. You are correct that disabling collisions with the setElementCollisionsEnabled function could potentially affect the lighting as well, as lighting in games often relies on collision information to calculate shadows and other visual effects.

To maintain the normal lighting for the peds while still disabling collisions with objects, you can try a different approach:

  1. Collision Groups: In many game engines, including Grand Theft Auto (GTA) modding, there are collision groups that define how objects interact with each other. You can assign the peds to a separate collision group that does not collide with objects like tables. This way, the peds won't be blocked by tables, but their lighting should remain unaffected.

  2. Alternate Collision Shapes: Instead of disabling the entire collision, you can try using simplified collision shapes for the peds. For example, you can use a cylinder or a capsule as the collision shape for the ped instead of the full complex shape. This will allow the ped to move freely without getting stuck on objects, while still providing some basic collision for lighting calculations.

  3. Lighting Tweaks: If the lighting issue persists, you may need to tweak the lighting settings or add additional lights to the scene to compensate for the lack of collision data. For instance, you could add ambient or fill lights to brighten up the area where the peds are located.

Remember that the specifics of implementing these solutions may depend on the game engine or modding framework you are using. Make sure to refer to the documentation or community resources for the specific modding tools you are working with.

Lastly, it's always a good idea to test each change you make in isolation, so you can identify the exact cause of the issue and better understand how different settings affect the game environment.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...