Jump to content

Make an NPC mirror the player's movement?


Radioactivelad

Recommended Posts

I was wondering if it would be possible to do an old-school trick for "reflections" by having a mirror image of a room on the other side of an invisible wall.

 

As the title implies, the biggest hurdle for selling this illusion is having an NPC mirror the player. Copying their appearance and equipment is pretty easy, but I'm not so certain on the movement.

 

Any ideas?

Link to comment
Share on other sites

You can make an invisible marker and have your reflection NPC always move to that marker. Then it's just a matter of calculating where to move the marker to on the other side of the "mirror" and which way to have it facing, both of which are easy to calculate (especially if you orient the "mirror" in either the X or Y direction).

 

I don't see any way to have the NPC mimic the player's animations though. If there is a way to force the game engine to do that, I don't know what it is.

Link to comment
Share on other sites

If a working mirror is what you desire I'd recommend learning the ProjectExtraCamera and AttachExtraCamera functions (These functions allow you to project a point of view from any location onto the surface of an object).

Can't really help you on how to get these functions working since the last time I tried to use them was several months ago but I do warn you, if you choose to go this route you might have to deal with problems involving occlusion culling.

 

Edit: Also, I should mention this note as seen on the wiki page: "This function should be considered EXPERIMENTAL, and may change considerably (or be scrapped, altogether) in the future."

Edited by IntenseMute
Link to comment
Share on other sites

I'd suggest checking the scripting used in one of those "controllable" creature type mods. The frontier has some and hopper made a were-claw mod that also has one:

https://www.nexusmods.com/newvegas/mods/60946

 

There are script functions within these that play a certain animation for a creature when the player presses a certain button. That might be what you are looking for.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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