# Tag Info

2

It's because WPF only refresh areas that need update. Thus, create something transparent refresh repeatedly cover the whole window when OnGameOverlayActivated fires. For popup, just cover the right bottom corner when game start.

2

With WPF, the UI ( or render I guess ) thread is kind of special. It'll try and run every 60th of a second. All of your View->ViewModel bound property read/writes are sort of banked up and updated on the UI thread. So you can alter a property a ton of times on a background thread but it will be updated on the UI thread. Command bindings ( like a button click ...

2

Unity - not unlike some other game engines - provides as the backbone of its architecture a scene-graph that unifies all aspects of the MVC / MVVM triad. Trying to work around such fundaments of the platform will only cost you more in time than you think you might gain by adapting it to the architectural paradigm you mention... rest assured. Re your ...

1

I can't provide you with the code solution, but here's some formulas you might find useful to do it yourself: Calculate eyeball position: position = normalize(food_piece - head_center) * head_radius Vector normalization: unit_vector = vector / length(vector) be careful not to divide by zero here, so check length before performing division Vector length:...

1

If there is no roll in your FPS camera (typically, there is not in an FPS) then all you need to do to get a yaw angle (-π..π ) from the vector is the atan2() function. As suggested by DMGregory, the arcsin of the z component of the forward vector gives the tilt angle. #include <math.h> ... // calculate yaw const float yaw_angle = atan2f( cam_fwd.y, ...

1

Did you solve this? D3DImage only works with Direct3D 9Ex surface so it won't work with DXGI/Texture2D which are Direct3D 11... unless you arrange some very tricky DXGI surface sharing between 11 -> 9Ex in advance. I have all the numerous code fragments that prove this should be possible (i.e. accelerated Direct3D 11 video pipeline targeting WPF) but have ...

1

Admittedly, this is an educated guess, so keep that in mind; WPF being the parent domain in this case means that all subprocesses like the XNA game are issued handles from that domain. I don't really know enough about the architecture behind WPF to adequately explain what it would be doing to cause the slowdown. However, as a possible fix, try automatically ...

1

I had to ask a friend that is good at 3D graphics this is what he did to make it right: ProjectionCamera camera = (ProjectionCamera) viewport.Camera; Vector3D ax1 = camera.LookDirection.Normalized(); Vector3D ax2 = Vector3D.CrossProduct(ax1, camera.UpDirection).Normalized() * -1; Vector3D ax3 = camera.UpDirection.Normalized(); Vector3D translation = (ax1*...

1

Since you're using WPF I expect you don't plan to use a lot of animation, so a better way to do this would be with a Grid: <!-- XAML --> <Grid x:Name="Board"> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> ...

1

I am guessing you are using System.Draw methods to draw the rectangles (I hope you are not drawing labels or something cause that would kill performance). I would make a mouse down event on the form, and then use the mouse position value to get the rectangle that was clicked depending on the width/height of them. So say the user clicks at 250,250 and the ...

Only top voted, non community-wiki answers of a minimum length are eligible