I posted this on gamedev but got no answers so I`m trying here as well.
https://gamedev.stackexchange.com/questions/200115/rotating-an-icon-on-minimap
I'm creating a minimap for my game. There is a mission where the player has to escort an NPC to an area. The minimap shows the player, the NPC and the location. The NPC icon sends an arrow from it's icon on the minimap to the destination location.
The minimap is zoomed in around the player and the location may be farther away then the minimap area, in this case, I put it on the edge of the minimap to make it still visible.
I'm using the dot product to calculate the angle between the NPC and the destination location, using a up vector (0,1). This works until the NPC is on the edge of the minimap. The angle is slightly off and the arrow icon is turned to the side.
I've confirmed both positions on the minimap are correct and the angle between them should be relatively small, but the calculation is too large. I'm unable to post a picture of the minimap here for NDA reasons, but I included a picture of the blueprint.
The arrow icon is facing down, which means it needs to be offset by some degrees depending on the quadrant, thus the addition at the end of the blueprint.
Related
I have a flashing icon on a Mapbox GLJS map that shows the location of my software.
I would now like to indicate the direction of travel, similar to how google maps shows it. See image.
Once this is implemented, I would also like to adjust the width of the heading indicator based on the current FOV of my real-world camera. Ie Current camera FOV at 20 degrees would be shown as a 20-degree cone on the map.
Id have thought this is quite a common need, so is there any styling that can simply be plugged in? If not, any pointers of how to go about this would be welcome. Cheers
icon image
I’m building a small web-based game that uses the computer’s built-in or attached camera. I’m using Machine Learning to recognize the user’s face and then have an avatar on the screen mimic the user’s movement (i.e. when the user’s face gets closer to the camera, the avatar gets bigger since the user’s face is closer to the camera; when the user moves right, the avatar moves right too).
One of my friends has a large monitor in front of him and then the laptop sits to his right. Hence, when he moves closer to the bigger monitor, the avatar shows him moving left, since the camera is to his right. This makes sense but I was wondering, from a mathematical point of view, given a set of (x, y) coordinates for the user’s nose, eyes and ears, how could I possibly rotate this set of coordinates around the y axis. We can assume that the camera sits 45 degrees to the right of my friend.
I’m hoping that with this rotation, when he moves closer to the screen he’s facing, the avatar will become bigger, mimicking his exact movements, despite the fact that the camera is to his right. One particular problem I’m struggling with is the size of the avatar - when the camera is to the right and the user moves left, the avatar becomes smaller since the face is moving away from the camera, but this shouldn’t be the case.
I’ve added the option to ask the user where the camera is positioned, but I need help with finding a plane rotation that will solve the issue above.
Thanks in advance.
h1, archilogic guys! It this possible? I don't like lined moves of camera inside tour.
On archilogic site only 'floor plan view' available for 'presentation'. i made tour with camera rotation, and he is beautiful except lined moves of camera. W8ing for the curve motion path. By the way, your is looks like deprecated SMILL, netherly?
p.s. i'm first time in aframe and three, only SVG before
p.p.s. svg keyframes doesn't work inside aframe texture, over...
p.p.p.s. ok, SMILL fail too...
I'm doing some simple plotting and would like to increase the usability of my figure.
I have quite a lot of points on my graph and have issues with selecting the ones I want because the click radius is so tiny.
I can increase the circle radius of my point but the radius of the area which displays a tooltip is still only 1 dot. Can I increase the radius somehow without having to create additional points around which respond the same?
Would it be even possible to increase the click detection radius without increasing the actual circle radius?
in the current version (0.8.2) and in the upcoming version (0.9) this is not yet a tunable parameter. It would be a good feature to expose a click radius, so I have made an issue on our issue tracker, that you can follow, here:
https://github.com/bokeh/bokeh/issues/2230
In the short term, a possible workaround is to have a second, invisible set of glyphs that are used for hit testing. They would be at the same locations, but bigger, to provide a bigger hit area.
I've created a simple triangular overlay using the Winforms GE API. As I'm zooming in and out parts or all of the overlay will disappear. The overlay is on the order of 80 miles in length.
The overlay is set to an altitude of 100 so I understand that when the overlay goes through a terrain feature it will disappear. My concern is when it is completely visible and I zoom in it disappears completely or in part. Since it is visible at a higher altitude shouldn't it also be visible at a lower altitude? (and I do realize that once I go 'below' the overlay it will disappear. This is not my problem.)
Any ideas or thoughts?
Actually, a ground overlay should stay on top of the terrain. So when the terrain is higher than '100' the overlay should be 'wrapped' over top of it. I am not sure about the overlay 'disappearing' at various heights (POV)
Recently, there was this question on SO - and the OP ended up saying they had contacted Google and the consensus was it was some sort of bug.......