Rocket-Ticket Questionthread (... haha)
Moderator: PPS-Leaders
Re: Rocket-Ticket Questionthread (... haha)
sorry for not being there on monday, I didn't feel well.
Will be there next monday. Again sorry.
Will be there next monday. Again sorry.
Re: Rocket-Ticket Questionthread (... haha)
Ok the rocket now explodes when colliding with an asteroid (or with a drone too) but it does not despawn afterwords. And the Controller doesn't control the rocket, I don't seem to get why.
Does the rocket need a specific tick-function to be able to do what the controller "tells it" to do?
at the moment the tickfunction does
I'm a bit stumped because I thought it once controlled the Rocket but I may be mistaken.
I committed my current files.
Does the rocket need a specific tick-function to be able to do what the controller "tells it" to do?
at the moment the tickfunction does
Code: Select all
SUPER(SimpleRocket, tick, dt);
I committed my current files.
Re: Rocket-Ticket Questionthread (... haha)
what do you mean with despawn?
if you look at the original rocket, you see why you rocket doesn't move: you need to apply you steering commands in the tick
if you look at the original rocket, you see why you rocket doesn't move: you need to apply you steering commands in the tick
There are only 10 types of people in the world: Those who understand binary, and those who don't.
Re: Rocket-Ticket Questionthread (... haha)
i want to apply the steering commands withing the controller, not the rocket.
with despawn i mean: disappear, so that the rockets aren't visible anymore
with despawn i mean: disappear, so that the rockets aren't visible anymore
Re: Rocket-Ticket Questionthread (... haha)
still you need to manifest the steering commands that you receive from the rocketcontroller and tell bullet in the tick that it needs to do something. remember: this->localAngularVelocity_ (i.e.) is just a member variable that does nothing if you don't use it in the tick. also you need to do the same for the linearVelocity.
about the "despawning" aka destroying: you need to check bDestroy_ in the tick and if it's true then execute this->destroy()
about the "despawning" aka destroying: you need to check bDestroy_ in the tick and if it's true then execute this->destroy()
There are only 10 types of people in the world: Those who understand binary, and those who don't.
Re: Rocket-Ticket Questionthread (... haha)
Aah ... it seems that at one time (I don't know when) I accidentally deleted the content of the tickfunction. *facepalm*
Well now that works, it spawns, gets controlled, uses those commands and get's destroyed.
Well now that works, it spawns, gets controlled, uses those commands and get's destroyed.
Re: Rocket-Ticket Questionthread (... haha)
Okay now I'm trying to give the rocketcontroller a target (from within the NewHumanController to use the rayquery which needs the camera of the controller). But how can I access the Functions of the newHumanController from within the rocketcontroller (or other way round, it wouldn't matter) ?
any Idea?
any Idea?
Re: Rocket-Ticket Questionthread (... haha)
rockercontroller->setTarget(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getTarget())
but you need to implement SimpleRocketController::setTarget first
edit: i will shortly move this thread to the developper's journals because imo that's the forum it should be in
but you need to implement SimpleRocketController::setTarget first
edit: i will shortly move this thread to the developper's journals because imo that's the forum it should be in
There are only 10 types of people in the world: Those who understand binary, and those who don't.
Re: Rocket-Ticket Questionthread (... haha)
ok I'll try it like this.
I also have to implement setTarget() or "setRocketTarget()" or something like this within the NewHumanController don't I ?
What is this target that I get with this "getTarget()" function you proposed?
and I'd say yes, this thread should be in the developper's journals...
I also have to implement setTarget() or "setRocketTarget()" or something like this within the NewHumanController don't I ?
What is this target that I get with this "getTarget()" function you proposed?
and I'd say yes, this thread should be in the developper's journals...
Re: Rocket-Ticket Questionthread (... haha)
no you don't have to. all this is done in NHC::updateTarget.
you probably get a controlleableentity or a pawn pointer with getTarget. you should have a look at ControllableEntity::getTarget. it's the target the player is aiming at (if he is aiming at something)
you probably get a controlleableentity or a pawn pointer with getTarget. you should have a look at ControllableEntity::getTarget. it's the target the player is aiming at (if he is aiming at something)
There are only 10 types of people in the world: Those who understand binary, and those who don't.
Re: Rocket-Ticket Questionthread (... haha)
Ok I will look at that.
Right Now I'm trying to do a "setTarget(Pawn* target)" function (similar to the "setOwner(Pawn* owner)" function of the rocket).
I have a WeakPtr<Pawn> target_ in the rocketcontroller and I try to assign the Pawn*target to this pointer:
(in setOwner it is done like this) but I get the following compile error(s):
The only difference in the assignment is the name of the variables.
Right Now I'm trying to do a "setTarget(Pawn* target)" function (similar to the "setOwner(Pawn* owner)" function of the rocket).
I have a WeakPtr<Pawn> target_ in the rocketcontroller and I try to assign the Pawn*target to this pointer:
Code: Select all
this->target_=target
Code: Select all
error C2440: 'initializing' : cannot convert from 'orxonox::Pawn *' to 'orxonox::OrxonoxClass *'
18> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Re: Rocket-Ticket Questionthread (... haha)
the problem was a missing include (you need to include Pawn.h if you use it)
committed the change
committed the change
There are only 10 types of people in the world: Those who understand binary, and those who don't.
Re: Rocket-Ticket Questionthread (... haha)
Ok thanks a lot now it get's a target (even though now it is a WorldEntity*, doesn't matter) and tries to move to the position of the target (or the projected position).
This doesn't work as of now (I used the AI-moveToPosition-funciton) but the rocket just moves in circles
This doesn't work as of now (I used the AI-moveToPosition-funciton) but the rocket just moves in circles
Re: Rocket-Ticket Questionthread (... haha)
Code: Select all
this->setVelocity( this->getOrientation()*WorldEntity::FRONT*this->getVelocity().length() );
Code: Select all
this->setVelocity( this->getOrientation()*WorldEntity::FRONT*this->speed_ );
Fabian 'x3n' Landau, Orxonox developer
Re: Rocket-Ticket Questionthread (... haha)
what is the current state of development?
this monday there's no pps, and because the presentation is just 2 weeks away you should speed up and maybe look for other (faster) ways to communicate with us if you have problems. i would esp. suggest our irc channel (reachable either over http://irc.orxonox.net or with an irc client irc.orxonox.net #orxonox )
this monday there's no pps, and because the presentation is just 2 weeks away you should speed up and maybe look for other (faster) ways to communicate with us if you have problems. i would esp. suggest our irc channel (reachable either over http://irc.orxonox.net or with an irc client irc.orxonox.net #orxonox )
There are only 10 types of people in the world: Those who understand binary, and those who don't.
Who is online
Users browsing this forum: No registered users and 4 guests