Object Movement/Creation

Everything about development and the OpenMW source code.
Post Reply
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Object Movement/Creation

Post by gus »

SetPos and getPos work. (i've note tested crossing cell border yet).
Position should work.
But i've a question with PositionCell: should i create a new function moveObjectToCell(ptr,newcell,position) in MWBase::World?

Edit: from uesp wiki for Position and PositonCell: "If you try to teleport to an unsafe place (clipping with an object or out in the void), you will instead be placed at the next safe location". It's rather complicated because it should find the same "safe location" than morrowind if we don't want to break compatibility right? And as i don't have my CD of morrowind right now, i can't really tell which way the "safe location" is found, so i won't be able to do it right away.
Last edited by gus on 05 Aug 2012, 17:59, edited 1 time in total.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Object Movement/Creation

Post by Zini »

Yes.
User avatar
greye
Posts: 47
Joined: 21 Jul 2012, 16:00

Re: Object Movement/Creation

Post by greye »

Added moveObject(Ptr &, CellStore &, f, f, f), pushed to local branch movement_code_refactoring. Still w/o safe location search.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Object Movement/Creation

Post by Zini »

Edit: from uesp wiki for Position and PositonCell: "If you try to teleport to an unsafe place (clipping with an object or out in the void), you will instead be placed at the next safe location". It's rather complicated because it should find the same "safe location" than morrowind if we don't want to break compatibility right? And as i don't have my CD of morrowind right now, i can't really tell which way the "safe location" is found, so i won't be able to do it right away.
We have a separate issue for this problem, because it is not specific to scripting instructions. The same feature will be used when NPCs move between cells by other means than scripts.

Its okay if you want to go ahead and implement safe NPC end positions anyway, but it is not needed right now IMHO. Also the changes to NPC physics that are currently worked on might interfere with the implementation.
Post Reply