cpmusick Posted February 4, 2014 Share Posted February 4, 2014 I'm currently working on a Silent Hill mod for MTA DayZ. So far I've been able to replace the zombies\wolf\fox\bear with SH creatures, player models with lead characters from SH3 and SH4, add SH background ambiance & siren, and have permanent foggy weather. However, the one thing I can't get right is the flashlight. I have downloaded the shader_flashlight_test mod ( https://community.multitheftauto.com/index.php?p=resources&s=details&id=6858), and it works great, but the flashlight is in the player's hand and requires using a handgun in order to aim the light properly. What I'm trying to do is attached that light to the player's chest (like in the Silent Hill games) so that it's hands free and is always facing the direction the player is. I have spent hours on this and just can't get it to work properly. The way the flashlight attaches is to two bones. One bone is the back side (the very end of the flashlight, opposite the bulb) and the front side (where bulb is). Attaching it to the elbow and hand bones works for using it in-hand, however, there are no two bones that will allow me to attach the light (not just the DFF model, but the light shader especially) to "broadcast" from the chest, directly in front of the player. I would really need another bone position that's further out towards the front of the body for that to work.....if any of this makes any sense. Does anyone know of any way I could get this to work? Here's how it looks when standing still (flashlight points to the ground): http://i.imgur.com/HYHlf6D.png If you're interested in images of the mod so far, here's a few screenshots: http://imgur.com/a/7WpkT Link to comment
Ren_712 Posted February 6, 2014 Share Posted February 6, 2014 The mod looks quite fun. However, the light source attachment will be a bit tricky to make. I'll just mention that light direction can be a relation of 2 bone positions - the vector is normalized in shader anyway. As a compromise you should see older flashlight shader - that enables alternative attachment to player head. Just take the bone positions plus horizontal rotation and put it in the latest resource. Not the best solution but the easiest. If you think about attaching the light source to chest - you'll have to base that on at least 3 bone positions. Look into bone_attach resource for detail on how to do that. Anyway good luck. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now