« first day (3594 days earlier)      last day (1416 days later) » 

1:57 PM
Thanks everyone ! We solved the issue... we simply referenced the entity struct instead of the component itself ^^
 
user92578
What entity struct?
 
Oh btw... how do we realize the rotation around a custom axis in opengl ? Youll need to calculate the angle between every single vertice and the x/y axis... so theres no way to realize this in the model matrix ?
@Tyyppi_77 entity_type | Entity... once you call registry.create() this returns that type which acts as the identity of a entity :) if you reference this you can simply use the registry to manipulate the entity
 
user92578
So you store entt::entity there?
 
Yep ^^
That technique was mentioned in the "Hierarchy" @DMGregory mentioned ^^ works fine...
 
Glad it could help you!
 
2:04 PM
So how do we solve that "Rotate around custom axis" problem in opengl ? Do we just use the middle point of the object we wanna rotate to calculate the angle between the axis to bring it to z ? ^^ @DMGregory Thanks again ! :D
 
You can find the formula for an axis-angle rotation matrix here, though I'd be surprised if there's not a convenience method available in your library that does this calculation for you.
 
Well we had the formula to rotate a point around a custom axis ^^ The problem here is just... i have no idea how this works with the model matrix... because we need to determine a angle between every point and the x/y angle to rotate the point towards z... the model matrix is getting multiplied with every single vertice to transform it... so we cannot use a custom model matrix for every vertice
 
The singular of "vertices" is "vertex"
3
And the link I just sent you shows you how to make a matrix that represents a custom axis rotation. You can then multiply that into your model matrix.
 
2:24 PM
Sorry, im clearly not a native english speaker ^^ thanks...
 
It's something English speakers do too. ;) It's a fight I'm losing, but it's the hill I've chosen to die on.
 
 
3 hours later…
5:20 PM
Rotation around arbitrary axis is awfull... it simply does not work in my case... im searching for hours since the right way... i implemented this formula here youtube.com/watch?v=XqNCbe2flb8
The problem here is... when we rotate that damn point onto the z axis... the rotation of the z axis and the reverting of the "help" rotations result in the same point we started with
 
Sounds like you should show us your code.
 

« first day (3594 days earlier)      last day (1416 days later) »