Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannon trap - Make it rotate toward its target & size issue #177

Open
1 of 2 tasks
Bertram25 opened this issue Sep 24, 2014 · 9 comments
Open
1 of 2 tasks

Cannon trap - Make it rotate toward its target & size issue #177

Bertram25 opened this issue Sep 24, 2014 · 9 comments
Milestone

Comments

@Bertram25
Copy link
Contributor

Hey there,

  • Implement Cannon rotation

The cannon trap is for now fixed, and looking northward. Thus, seeing it shoot targets makes it weird most of the time.

The cannon should instead rotate toward its target and shoot when both its rotation is finished and its reload time is done.

Thus, the rotation depending on the line of sight toward its target should be implemented, and the actual rotation shouldn't be instantly done, but rather animated, while quick enough not to be boring.

  • Cannon model size issue

When placed against a wall north from it, the cannon model goes through that wall.
As a simple solution, the model should be resized (programmatically until the entities.cfg file is done) so that it isn't wider than one tile.

@Danimal696
Copy link
Contributor

the one ill do will be a lot shorter, also i think ill make a fixed "feet" and a mobile upper part. Its that fine?

@Bertram25
Copy link
Contributor Author

the one ill do will be a lot shorter, also i think ill make a fixed "feet" and a mobile upper part. Its that fine?

From what I understand, in short, it's better to have separate meshes, making it much easier to rotate only the mobile mesh code-wise.

If you're making a single mesh file with sub meshes, the only way to touch the sub-meshes separately is to create a skeleton and link it to the sub-meshes. We could then be able to play with its "bones" but only through animations AFAIK and that's not what we want, IMHO.
If someone knows more than me here, feel free to correct me, though. :)

@Bertram25
Copy link
Contributor Author

I'll have a look at attach points in skeleton files, too.

Btw, could you, when you have the time to, describe somewhere on the forums on in the wiki, what are the necessary bones and attach points needed in a skeleton file, so that a creature model can be "equipped"? Thanks :)

@Danimal696
Copy link
Contributor

it is on the wiki, on the part about importing models

@Bertram25
Copy link
Contributor Author

it is on the wiki, on the part about importing models

Ah, true, sorry:

Creatures with hands that should be able to hold a weapon should have two bones at their hands that have to be named Weapon_L and Weapon_R. The z-axis should point back, if the weapon is held vertically (check out a model in the repository).

@Bertram25
Copy link
Contributor Author

After some reading, it seems there might be a way to rotate attach points in skeletons with the cost that animations wouldn't work on those points from what I've read. All this is still very wild guesses, though. I'd need to make a few tries...

@oyvindln Any idea?

@Bertram25 Bertram25 added Enhancement and removed Bug labels Sep 29, 2014
@hwoarangmy
Copy link
Contributor

Size issue is fixed as a side effect in #209

@Danimal696
Copy link
Contributor

i wonder, how was it resolved? did you made the model smaller?

@hwoarangmy
Copy link
Contributor

Before my last PR, the mesh used for traps was displayed at full scale (exactly like room mesh). I've changed that so that it uses a room object rather than a ground mesh.
And in code, every room objects are scaled by 0.7. That's why I said it was a side effect :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants