Jump to content

Home

How do I set the position of a entity?


dnifan

Recommended Posts

Posted

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 :D

Posted

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?

Posted

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 :p Doesn't work.

Posted

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...