dnifan Posted December 17, 2007 Posted December 17, 2007 Well, there's my question, I really hope someone can answer it as I've been busy with it for almost a week now. And I just can't seem to get the solution. Thanks
DarthDie Posted December 17, 2007 Posted December 17, 2007 You need to unlink the entity, set origin, then link again. Right? trap_UnlinkEntity, trap_LinkEntity, ent->r.currentOrigin .
dnifan Posted December 18, 2007 Author Posted December 18, 2007 I already tried that, and other numerous possibilities. Unfortunately, they failed.
razorace Posted December 18, 2007 Posted December 18, 2007 I don't think you need to relink an object to move positions like that. From what I remember, I think there's a SetOrigin function that does all the hard work for you. Where in the code are you trying to do this?
dnifan Posted December 18, 2007 Author Posted December 18, 2007 I need to reposition a entity that has no position yet. Already linked. You mean G_SetOrigin(gentity_t *ent, vec3_t *pos) right? Well, I already tried that Doesn't work.
dnifan Posted December 20, 2007 Author Posted December 20, 2007 G_Spawn(), and then a G_InitEntity (or something like that)
razorace Posted December 20, 2007 Posted December 20, 2007 hmmm, that should work. maybe something else if preventing it from happening. What sort of object are you creating?
ensiform Posted December 20, 2007 Posted December 20, 2007 You shouldn't need to G_InitEntity. G_SetOrigin should work if you know an origin to set it to, like say the player's origin and then maybe move it out a ways by factoring in the YAW portion of viewangles. you dont use G_SetOrigin(yournewentity, yournewentity->s.origin) you would choose some local variable or base it off of something that already exists.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.