Away3D 3.6 Strange MovieMaterial Behaviour - away3d

I'm developing a very simple cube with Away3d 3.6 which has a MovieMaterial for one side.
The MovieClip I set as Material contains a videoplayer which, outside of the cube, works perfectly.
Unfortunately as soon as I use it as material it doesn't seem to update while the video is on focus but you can see it playing when I tween the cube rotation property.
Here is an example: http://clients.weborama.nl/files/campaigns2/2124906084/70549/IT_repubblica.it_D_moda_201401_index.html
Can anybody explain to me why is this happening?
Thank you!

Fixed it!
I noticed I removed the ENTER_FRAME event listener which rendered the scene when there was no need to do it.

Related

Unity URP Material scripting

I just started using URP in Unity for a game in progress. I'm doing a sort of sprites-in-3d thing, so I'm rendering some sprite sheets on quads. To do this, I create a Material with the sprite sheet and use tiling/offset to render the proper frame of animation by making a call like:
CombatMaterial?.SetTextureOffset("_BaseMap", new Vector2( (AnimationDefinitions[animationDefinition] % 16) * .0625f, CombatMaterial.mainTextureOffset.y));
I'm currently trying to add some feedback into my game for when characters use abilities or get hit by flickering the material. Because the base color starts at white and goes to black, that won't really work; the only other thing I seem to have available to me is emission, which looks great. Using a 0xAAAish color achieves the effect I'm looking for. I've been using the Feel Unity asset to do this, but I've also attempted using something like this:
CombatMaterial?.SetColor("_EmissionColor", Color.white);
The problem is, once I've set the _EmissionColor, the main texture offset no longer updates in game, thereby ruining all animations. If I change the texture offset manually through the inspector at runtime, animations don't work AND the _EmissionColor flickering stop working. If I mess around with the color of the _BaseMap in the inspector, _EmissionColor flickering starts working again.
Before I start diving into some unsightly color adjustments in an attempt to make this work again, I would love to know if I'm doing something that is simply unsupported by URP/Materials/whatever, or if there is some alternative to what I'm doing that's a little more straightforward.
Thank you!
After trying a bunch of random stuff, I don't have a "real" solution, but the game IS working how I want it to.
What worked for me was setting the _EmissionColor on the Material to (1,1,1). For some reason, when the _EmissionColor is set to (0,0,0) it's a black (ha) hole and won't accept future changes to the _EmissionColor. I assume this is some shader nonsense (with the base Lit Shader that URP uses) that I am clearly unfamiliar with.
Hopefully this helps anyone doing something as pointlessly against the grain as I am!

Unity OnMouseEnter() or OnMouseOver() not working

I want to make an Inventory System in Unity, so I tried to follow this tutorial, but the functions OnMouseEnter and OnMouseOver are not working.
I tried everything like 3d colliders with z-value of 100, with trigger and not trigger, and also I checked if the Physics.queriesHitTriggers is true, but nothing works. Do you have any easy tips?
Not with raycasting... I'm quite new and don't understand this.
Try adding a box collider or box collider 2d
Try adding an rigidbody besides the collider and you can do it kinematic
Try adding add a EventSystem if you are using canvas ui
And verify that it does not have an object like a canvas blocking the camera raycast.
good luck.
The GameObject you're trying to use mouse with, needs to have at least one component that is a rayccast target. an Image or SpriteRendrer should do it.
The thing I found out is that OnMouseOver only works in the Game tab and not working in the Scene tab :)
It's much easier and cleaner to use Unity UI System to make Inventory, Just Create Canvas, Image inside of it and add EventTrigger component to that Image object, and modify events inside of it in the inspector, add any functions you want on any event it supports it, it is much cleaner solution. Try this tutorial https://www.youtube.com/watch?v=HZpq46W4xo4
U can do whatever you want with this system, just a little bit of thinking and planing your own Inventory Req...
Best of luck!

All default unity objects are black?

This is the first time I've used Unity and I am trying to follow a basic tutorial on making a simple ball game. In the tutorial "Roll-a-ball", all of the objects appear white and you can see the shadows they make. I followed the tutorial completely, but everything I make shows up as black and I cannot differentiate the objects from each other. What is causing this and how can I fix it?
There is no camera added to your scene & also lighting.
Add the Main Camera & Directional Lighting. It will do the trick.

unity3d - Camera jittering?

For some reason when I run my game the camera which follows the player has a slight jitter to it. If I watch the transform the Y position values are fluxuating and the rotation is affected aswell. I can not think of any reason for this to be happening other than maybe having more than one camera as my water comes with a 'reflection camera'. I am using basic unity packages, and even when rewriting the camera follow script, the problem still occurs.
I know there is not much to go on here, as the code is minimal for this issue(using 3rd person controller and camera components). I hope someone has had this error in the past and fixed it or knows enough about unity to help me out here because im lost.
Much appreciated
EDIT
Dont know if animations could be effecting it but I thought id mention my model has animations
To resolve your problem. Click Assets->Import Package-> Characters Uncheck everything Execpt. SmoothFollow.
Drag Smooth Follow to your Camera. Drag your Character to the Target from Smooth Follow Script.
If this doesn't fix the issue. Try to remove your own script.

Why touching a slider that is on top of a SCNView moves the camera underneath on iOS 8/Swift?

Using Xcode 6 GM, I created a new project based on the Game template using SceneKit and Swift. Then I dragged a slider onto the SCNView. Now in the simulation, when I move the slider, the slider moves (as expected) but the camera moves as well (like if I was simply touching the screen). I'm not an experienced iOS developer but I never had this problem in the past. Did I forget to do something? Did anything change recently in the default behaviour of sliders? It looks more like a bug to me. If you add a slider, you want to control only this slider, not what is underneath.
Anyone can help me there or confirm the issue? Sorry if it's the answer is very simple. I googled my problem but could not find anything.
There is a property on the scene called allowsCameraControl, and if that is set to true then the panning will control the camera. It's probably on by default in the game template.